package com.yunbao.ioc.io;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Created by louisyuu on 2020/3/3 下午2:56
 */
public class Resources {


    public static InputStream getResourceAsStream(String path) {
        return Resources.class.getClassLoader().getResourceAsStream(path);
    }


    public static Properties loadPropeteies(String path) {
        Properties properties = new Properties();
        try {
            properties.load(getResourceAsStream(path));
            return properties;
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;

    }
}
